package com.chaoyi.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import com.chaoyi.processor.UserActionProcessor;
import com.chaoyi.util.schedule.JobManager;

public class InitServlet extends HttpServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7552661339225243796L;

	@Override
	public void destroy() {
		super.destroy();
		UserActionProcessor.INSTANCE.shutdown();
		JobManager.INSTANCE.shutdown();
	}

	@Override
	public void init() throws ServletException {
		super.init();
		UserActionProcessor.INSTANCE.start();
		JobManager.INSTANCE.start();
	}
	
}
